#! /usr/bin/env python
# coding=utf-8


import os, sys

_this_file_dir = os.path.dirname(__file__)

VERSION = "1.2.0"

LOAD_BALANCE = 'http://gappproxy-center.appspot.com/available_fetchserver.py'
GOOGLE_PROXY = 'www.google.cn:80'

DEF_LISTEN_PORT = 8000
DEF_LOCAL_PROXY = ''
DEF_FETCH_SERVER = 'http://nettransit4ylb.appspot.com'
#DEF_FETCH_SERVER = 'http://localhost:8091'
#DEF_CONF_FILE = os.path.join(dir, 'proxy.conf')
DEF_CERT_FILE = os.path.join(_this_file_dir , 'ssl/LocalProxyServer.cert')
DEF_KEY_FILE  = os.path.join(_this_file_dir , 'ssl/LocalProxyServer.key')

SUPPORTED_METHODS = set(('GET', 'HEAD', 'POST'))


ENABLE_ENCRYPTION = False
# ENCRYPTION_DICT: a 256 length string, use str.translate to encrypt
ENCRYPTION_DICT = ""

#class GAppProxyError(Exception):
    #def __init__(self, reason):
        #self.reason = reason

    #def __str__(self):
        #return '<GAppProxy Error: %s>' % self.reason


# localproxy
LOCALPROXY_LISTEN_ADDRESS = "0.0.0.0"
LOCALPROXY_LISTEN_PORT = 8000

